<?php

namespace app\modules\api\controllers;

use yii;
use app\components\XSecurity;

class TestController extends BaseController 
{
	public function actionIndex()
	{
		$this->apiRsp(0,"8989","ok");

	}
	/**
	 * 加密解密示例
	 */
	public function actionDes()
	{
		$username = "daqianshijie";
		$username1 = XSecurity::apiSTD3Encrypt($username);
		
		$username1 = urldecode($username1);//如果经过浏览器请求，会自动urldecode
		$username = XSecurity::apiSTD3Decrypt($username1);
		$this->apiRsp(0,$username);
	}
}
